<div class="issue-page-solution-list">

  <div class="row">
    <div class="list-toolbar with-descr col-xl-12">
      <div class="title">
        问题界面方案
      </div>

      <div class="filter"></div>

      <div class="buttons">
        <button (click)="editSolution(null)" type="button" class="btn btn-primary btn-with-icon btn-sm">
          <i class="fa fa-plus-circle"></i>新建
        </button>
      </div>
    </div>

    <div class="instruction no-span">
      <span>关联</span><span [outerHTML]="'界面' | term"></span><span>到指定</span>
      <span [outerHTML]="'问题类型' | term"></span>
      <span>的创建、编辑、查看操作。可在项目配置页引用。</span>
    </div>
  </div>

  <div class="page-list">
    <table class="table table-bordered table-striped">
      <thead class="thead-inverse">
      <tr>
        <th style="width: 200px">名称</th>
        <th style="width: 250px;">是否默认</th>
        <th style="width: 250px;">是否內置</th>
        <th style="width: 200px">操作</th>
      </tr>
      </thead>

      <tbody>
      <tr *ngFor="let item of solutions; let i = index;">
        <td>{{item.name}}</td>
        <td>
          <input *ngIf="!item.defaultVal" (change)="setDefault(item)" [(ngModel)]="item.defaultVal" type="checkbox" name="default" #default>
          <input *ngIf="item.defaultVal" onclick="return false;" [(ngModel)]="item.defaultVal" type="checkbox" name="default" #default>
        </td>
        <td>{{ item.buildIn | trueOrFalse }}</td>
        <td>
          <span (click)="editSolution(item)" class="link no-underline">编辑</span>
          <span (click)="configSolution(item)" class="link no-underline">配置</span>
        </td>
      </tr>
      </tbody>
    </table>
  </div>

</div>
